package com.zdb.demo.design.pattern.structural.decorator.v2;

public class EggDecorator extends AbstractBattercakeDecorator {

    public EggDecorator(ABattercake aBattercake) {
        super(aBattercake);
    }

    @Override
    public void doSomething() {
        System.out.println("---- egg -----");
    }

    @Override
    protected String getDesc() {
        return super.getDesc() + " 加一个鸡蛋";
    }

    @Override
    protected int getCost() {
        return super.getCost() + 1;
    }
}
